import React from 'react';
import ReactDOM from 'react-dom/client';
import { DndProvider } from 'react-dnd';
import { HTML5Backend } from 'react-dnd-html5-backend';
import { ConfigProvider } from 'antd';
import zhCN from 'antd/locale/zh_CN';
import App from './App';
import '@renderer/assets/main.css';
import './main.css';

const rootEl = document.getElementById('root');
if (rootEl) {
  const root = ReactDOM.createRoot(rootEl);
  root.render(
    <React.StrictMode>
      <DndProvider backend={HTML5Backend}>
        <ConfigProvider locale={zhCN}>
          <App />
        </ConfigProvider>
      </DndProvider>
    </React.StrictMode>,
  );
}
